-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: Add delete functionality for AI messages and subsequent nodes #9036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added delete button to AI text messages, API request messages, and completion messages - Implemented right-click context menu for delete operation - Reuses existing backend deletion logic that removes selected message and all subsequent messages - Only shows delete controls when message is not streaming Fixes #9035
Review StatusI've reviewed the PR and identified issues that need attention. Issues to Address
Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request. |
| : 0, | ||
| justifyContent: "space-between", | ||
| }} | ||
| onContextMenu={(e) => e.preventDefault()}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right-click context menu functionality described in the PR doesn't actually work. The onContextMenu handler prevents the browser's default menu but doesn't open the DropdownMenu on right-click. Radix UI's DropdownMenuTrigger only responds to left-clicks by default. Right-clicking these elements will show no menu at all, breaking expected user interaction.
To enable right-click opening, you need controlled state:
const [open, setOpen] = useState(false)
<DropdownMenu open={open} onOpenChange={setOpen}>
<DropdownMenuTrigger asChild>
<div onContextMenu={(e) => {
e.preventDefault()
setOpen(true)
}}>Alternatively, if right-click isn't required, remove the onContextMenu handlers to restore the browser's default menu.
Fix it with Roo Code or mention @roomote and request a fix.
| "url": "Enganxa la URL per obtenir-ne el contingut" | ||
| } | ||
| }, | ||
| "deleteMessageAndSubsequent": "Delete message and subsequent nodes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All non-English locale files contain the English text "Delete message and subsequent nodes" instead of proper translations. This breaks internationalization for users with non-English language settings. Each locale file should have the string translated to its respective language (Catalan, German, Spanish, French, Hindi, Indonesian, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Turkish, Vietnamese, Chinese Simplified, and Chinese Traditional).
Fix it with Roo Code or mention @roomote and request a fix.
|
@roomote how does this handle checkpoints? |
Summary
This PR addresses Issue #9035 by adding the ability to delete AI messages and all subsequent nodes in the conversation flow, similar to the existing functionality for user messages.
Changes
Implementation Details
The implementation follows the same pattern as the existing user message deletion:
Testing
Fixes #9035
Screenshots
The delete button appears on hover for AI messages, matching the UX of user message deletion.
Feedback and guidance are welcome!